﻿<MCard Flat>
    <MCardText>
        <MContainer Fluid class="green lighten-2">
            <MRow>
                <MCol Cols="9">
                    <div class="ma-auto" style="max-width: 300px">
                        <MOtpInput @bind-value="@otp" Length="@length" Dark></MOtpInput>
                    </div>
                </MCol>
                <MCol Cols="2" class="my-3">
                    <MButton Block Disabled="!isActive"> Ready</MButton>
                </MCol>
            </MRow>
        </MContainer>
    </MCardText>
</MCard>

@code {
    string otp = "";
    int length = 7;
    bool isActive => otp.Length == this.length;
}